package com.you.atlas.web.member.module.action;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.citrus.turbine.Context;
import com.you.common.webx.AuthContext;
import com.you.member.dal.dao.AccountBindDAO;
import com.you.member.dal.dao.dataobject.AccountBindDO;

public class BindCancelAction {

    @Autowired
    private AccountBindDAO accountBindDAO;

    public void doDouban(Context context) {
        AccountBindDO accountBindDO = accountBindDAO.findByMemberId(AuthContext.getContext().getMemberId());
        if (accountBindDO != null) {
            accountBindDO.setDoubanId(null);
            accountBindDO.setDoubanToken(null);
            accountBindDO.setDoubanSync(null);
            accountBindDAO.update(accountBindDO);
        }
    }
}
